﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Tilver.Api.Weixin.MP.Entities;
using Tilver.Api.Weixin.MP.Entities.Menu;

namespace Tilver.Api.Weixin.MP
{
    /// <summary>
    /// 获取菜单时候的完整结构，用于接收微信服务器返回的Json信息
    /// </summary>
    public class GetMenuResultFull : WxJsonResult
    {
        public MenuFull_ButtonGroup menu { get; set; }
        public GetMenuResultFull()
        {
            menu = new MenuFull_ButtonGroup();
        }
    }

    public class MenuFull_ButtonGroup
    {
        public List<MenuFull_RootButton> button { get; set; }
        public MenuFull_ButtonGroup()
        {
            button = new List<MenuFull_RootButton>();
        }
    }

    public class MenuFull_RootButton
    {
        /// <summary>
        /// 菜单的响应动作类型，目前有click、view两种类型
        /// </summary>
        public string type { get; set; }
        /// <summary>
        /// 菜单KEY值，用于消息接口推送，不超过128字节(click类型必须)
        /// </summary>
        public string key { get; set; }
        /// <summary>
        /// 菜单标题，不超过16个字节，子菜单不超过40个字节
        /// </summary>
        public string name { get; set; }
        /// <summary>
        /// 网页链接，用户点击菜单可打开链接，不超过256字节(view类型必须)
        /// </summary>
        public string url { get; set; }
        /// <summary>
        /// 二级菜单数组，个数应为1~5个
        /// </summary>
        public List<MenuFull_RootButton> sub_button { get; set; }
        public MenuFull_RootButton()
        {
            sub_button = new List<MenuFull_RootButton>();
        }
    }
}
